package com.njcb.game.bootconfig;

import com.njcb.game.web.service.S10001000001;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.xml.ws.Endpoint;

@Configuration
public class WebServiceConfig {

    @Autowired(required = false)
    private SpringBus springBus;

    @Autowired(required = false)
    private S10001000001 s10001000001;

    @Bean
    public Endpoint S10001000001() {
        // 绑定要发布的服务实现类
        EndpointImpl endpoint = new EndpointImpl(springBus, s10001000001);
        // 接口访问地址
        endpoint.publish("/S10001000001");
        return endpoint;
    }

}
